import HttpRequest from "@/utils/request";
import { IBillingManagement, IBillingManagementRows } from "./type";

// 查询列表
export function getBillingManagements(params = {}) {
  return HttpRequest<IBillingManagementRows>(
    "/billingManagement",
    "GET",
    params,
    {
      isLoading: true,
    }
  );
}

// 查询列表
export function getAllBillingManagement(params = {}) {
  return HttpRequest<IBillingManagementRows>(
    "/billingManagement/findAll",
    "GET",
    params,
    {
      isLoading: true,
    }
  );
}

// 查询某个
export function getBillingManagement(id: number) {
  return HttpRequest<IBillingManagement>("/billingManagement/" + id, "GET");
}

// 新增
export function addBillingManagement(params = {}) {
  return HttpRequest("/billingManagement", "POST", params);
}

// 修改
export function updateBillingManagement(params: any) {
  return HttpRequest("/billingManagement", "PUT", params);
}

// 删除
export function delBillingManagement(ids: number[] = []) {
  return HttpRequest("/billingManagement", "DELETE", { ids: ids.join() });
}
